package com.ym.controller.medical;

import com.ym.core.annotation.Log;
import com.ym.core.domain.APIResponse;
import com.ym.core.domain.BaseController;
import com.ym.medical.service.IUserTaglibrarySV;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

/**
 * 用户标签表Controller
 *
 * @author ym
 * @date 2020-08-20
 */
@Api(tags = "medical-用户标签表")
@RestController("UserTaglibraryPcController")
@Validated
@RequestMapping("/medical/userTaglibrary")
public class UserTaglibraryController extends BaseController {

    @Autowired
    private IUserTaglibrarySV userTaglibrarySV;

    @ApiOperation("删除用户标签表")
    @Log(printQuery = false)
    @PostMapping("/delete")
    public APIResponse delete(@RequestBody @Valid @NotNull Long[] ids) {
        int result = userTaglibrarySV.deleteByIds(ids);
        return successData(result);
    }
}
